<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>canvas绘制角</title>
	</head>
	<body>
		<canvas id="canv" width="500" height="500" style="border:solid 2px red;">
			当前浏览器不支持canvas
		</canvas>		
		<script>
			var oC=document.getElementById("canv");
			var ctx=oC.getContext("2d");			
			//绘制角，给角设置拐角类型和衔接长度。
			ctx.moveTo(100,100);
			ctx.lineTo(300,100);
			ctx.lineTo(100,200);
			//给线条设置宽度
			ctx.lineWidth=7;
			//设置拐角类型为斜角,默认值
			ctx.lineJoin="miter";
			//设置衔接长度，即内角和外角的距离
			ctx.miterLimit=3;
			ctx.stroke();
		</script>
	</body>
</html>
